package com.yf.fragmentdynamic;

import android.app.Fragment;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

public class SecondFragment extends Fragment {

	private TextView tx_title;
	private TextView tx_desc;

	@Override
	public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
		View view = inflater.inflate(R.layout.fragment2, null);
		tx_title = (TextView) view.findViewById(R.id.title);
		tx_desc = (TextView) view.findViewById(R.id.desc);

		return view;
	}

	public void setTitle(CharSequence title) {
		tx_title.setText(title);
	}

	public void setDesc(CharSequence desc) {
		tx_desc.setText(desc);
	}
}
